package com.nova.bluetooth.ui.device;

import android.os.Bundle;

import androidx.activity.EdgeToEdge;
import androidx.recyclerview.widget.LinearLayoutManager;

import com.dido.fastblelib.data.BleDevice;
import com.nova.bluetooth.adapter.ScanningAdapter;
import com.nova.bluetooth.base.BaseActivity;
import com.nova.bluetooth.databinding.ActivityAppScanBluetoothBinding;
import com.nova.bluetooth.databinding.ActivityConnectedListBinding;

import java.util.ArrayList;
import java.util.List;

public class ConnectedListActivity extends BaseActivity {

    private ActivityConnectedListBinding binding;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        binding = ActivityConnectedListBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());

        initView();
        initData();
    }

    private ScanningAdapter mAdapter;;
    private void initView() {
        mAdapter = new ScanningAdapter();
        binding.recycler.setLayoutManager(new LinearLayoutManager(this));
        binding.recycler.setAdapter(mAdapter);

        binding.ivBack.setOnClickListener(v -> finish());
    }

    private void initData() {
//        List<BleDevice> mData = new ArrayList<>();
//        for (int i = 0; i < 5; i++){
//            mData.add(new BleDevice());
//        }
//        mAdapter.setList(mData);
    }
}